package com.tzz.controller;

import com.tzz.entity.GoodsArriveMsg;
import com.tzz.entity.HttpResult;
import com.tzz.service.GoodMonitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/monitor")
public class GoodMonitorController {

    @Autowired
    GoodMonitorService goodMonitorService;

    @PostMapping("/create")
    public HttpResult create(@RequestBody GoodsArriveMsg goodsArriveMsg){
        System.out.println(goodsArriveMsg);
        goodMonitorService.productMonitorMsg(goodsArriveMsg);
        return HttpResult.success();
    }
}
